package dyyx;

import java.util.Date;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AsynLogTest {	
	private static final Logger log ;
	static{	
		 System.setProperty("logdir", "/Users/dugang/alllog/asyn/");
		 // final public static String CONFIG_FILE_PROPERTY = "logback.configurationFile";
		 System.setProperty("logback.configurationFile", "logback-asyn.xml");	 
		 log = LoggerFactory.getLogger(AsynLogTest.class);	 
	}

	public static void main(String[] args) throws Exception {		
			int num = 1000000;
			long start = System.currentTimeMillis();
			for(int i=0;i< num;i++){
				log.info(new Date()+"-"+i);
				if(i > 0 && i%10000 ==0){
					System.out.println(System.currentTimeMillis()+":"+i);
				}
			}
			long end =  System.currentTimeMillis();;
			long time = end - start;
			System.out.println(time);
	}
}
